$(function () {
  // alert('ok')
  $("#logout-btn").on("click", function () {
    //询问是否退出
    layui.layer.confirm(
      "您确定要退出吗？", {
        icon: 3,
        title: "提示"
      },
      function (index) {
        //清处token
        localStorage.removeItem("token");
        //页面跳转到登录页
        location.href = "./login.html";
        layui.layer.close(index);
      }
    );
  });
});